import tensorflow as tf
from tensorflow.keras import layers, models

# 构建RNN模型
model = models.Sequential([
    layers.SimpleRNN(64, input_shape=(10, 50)),
    layers.Dense(10, activation='softmax')
])

model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])